import request from "@/util/request";

// 活动详情
export const getActivityParticulars = (id) => request({
  url: '/qichong-record/api/activity/detail',
  params: {
    id
  }
})

// 任务列表
export const getTask = id => request({
  url: '/qichong-record/api/activity/tasks',
  params: {
    id
  }
})
// 任务明细
export const getheat = (TaskQuery) => request({
  url: '/qichong-record/api/activity/taskLog',
  params: TaskQuery
})
// 全部
export const page = (AllQuery) => request({
  url: '/qichong-record/api/article/page',
  params: AllQuery
})
// 活动排行
export const ActivityRanking = (RankingQuery) => request({
  url: "/qichong-record/api/activity/ranking",
  params: RankingQuery
})
// 奖励池列表
export const getawardList = (activityId) => request({
  url: '/qichong-record/api/activity/rewards',
  params: {
    activityId
  }
})

// 获取优惠卷详情
export const getCoupon = (couponUserId) => request({
  url: '/qichong-record/api/marketing/me/coupon/detail',
  params: {
    couponUserId
  }
})

// 获取优惠卷列表
export const getCoupons = (CouponsQuery) => request({
  url: '/qichong-record/api/marketing/me/coupon',
  params: CouponsQuery
})


// 表单详情
export const getFormdetail = (id) => request({
  url: '/qichong-record/api/marketing/form/detail',
  params: {
    id
  }
})

export const postFormdetail = (form) => request({
  url: '/qichong-record/api/marketing/form/submit',
  method: 'post',
  data: form
})

// 参与活动得用户
export const getJoinersList = (activityId) => request({
  url: '/qichong-record/api/activity/joiners',
  params: {
    activityId
  }
})
